After reading an original document into image data, the image data may be stored in a memory of an image forming apparatus in a compressed format to effectively use the memory space, which is limited. For example, JPEG or JPEG 2000 compression may be applied to RGB image data obtained by scanning to generate compressed image data. When printing, the compressed image data read out from the memory is expanded to generate expanded image data.
For example, FIG. 1 is a timing chart illustrating operation of compressing image data performed by a background image compressor including a selector provided with a buffer memory, a compressor, and a main memory. When image data is input, the selector divides the image data into unit data A to H, and stores the unit data A to H in the buffer memory. The compressor reads out the unit data A to H from the buffer memory, applies compression to the unit data A to H to generate compressed unit data A to H, and stores the compressed unit data A to H in the main memory.
Recently, there is a need for processing the image data that is large in data size. In order to save the memory space, a user may want to apply various image processing such as editing to a selected portion of the compressed image data without requiring the entire image data to be expanded. However, depending on the compression standard of the compressed image data, image processing can be applied to the selected portion only after the entire image data is expanded.
JPEG 2000 standard allows the user to selectively apply image processing without requiring the entire image data to be expanded. For example, the user may expand a specific portion of the compressed image data and apply image processing to the specific portion of the image data. In order to allow the user to expand the selected portion of the image data, the selected portion, which may be defined by the unit data, should be randomly accessible.
Referring back to FIG. 1, in the case of operation performed by the background image compressor, the compression rates are different from unit data to unit data. Accordingly, the address of unit data in the memory space is not previously defined. Since the address of unit data is not predictable at the time of random accessing, the time for processing random access may increase. Further, the memory space may not be effectively used as the memory space contains the address not storing any data.
In addition to the need for the effective use of memory space, there is a need for increasing the overall processing speed. As indicated by the arrow shown in FIG. 1, the buffer memory is not overwritten until processing of all unit data A to H is completed. This may cause the processing time T1 needed for compressing image data to be relatively long.